Latest Questions

Unpivot/Transpose in Presto SQL

I have a dynamic table in the format shown in the image (left hand side). A new month column will be added every month. How do I unpivot month in Presto? I can

insert the last 30 date in an oracle table

I need to create a table where we have one date column. I need to insert the date from yesterday to yesterday-30 days.Table output should look like this There

MacOS IOkit get services by property name in Swift

I would like to get all services that contain specific properties. AppleDeviceManagementHIDEventService <class AppleDeviceManagementHIDEventService, id 0x1

ESP32-cam pixel_format

I am using a ESP32-cam with Arduino IDE ver 1.8.6. I'm working on a project with PHP and esp32cam. In my code, the same esp will detect motion then read a qr c

Django & Djoser 'NoneType' object has no attribute 'lower' 'NoneType' object has no attribute 'lower'

I keep having an error whenever I try to PATCH in order to update a specific user info. As per Djoser documentation, the endpoint is located in /users/me/ https

Why are all my variables objects instead of numerical values (int,float) when uploaded?

I just started so that might be stupid, but I have following problem: I created a .csv-file for some basic data description. However, although they are all nume

CREATE TABLE AS takes too long in clickhouse

I am trying to create a table in Clickhouse(v22.4.3) based on the result that returns a query. The query returns only 1 record and takes around 12 seconds to be

Utilizing multiple processors to load large number of files for pandas (python)

I need to load hundreds or thousands of JSON files into a big pandas dataframe. My current solution using a for loop to iterate the directory is slow and is not

Asterisks in the output of R describe function

What does it mean the asterisk next to some item names in the descriptive statistics table given by describe function (package psych) in R ?

How to clear user input in Javascript CodeHS?

I'm using Javascript in CodeHS to create a 10-question quiz asking for user input in each question. After about the fourth question, the user must scroll down t

Cannot restart typedef'd 2D array whose address is saved in struct

I have this typedef and struct: typedef double mat[MAT_SIZE][MAT_SIZE]; typedef struct matList { char *name; mat *matrix; } matList; and I create an a

How can I change the text color of an Ant Design Radio component when it is disabled

I want to change the text color when an Ant Design Radio button is disabled. I have been trying things like this... .ant-radio[disabled]:active { color: $g0

Inertia compensated mouse position in Javascript

I am attempting to add an inertia type effect to my parallax background which is based on the current mouse position. I have found a script that can take the po

What does the conflict "Both Modified" mean in git

I am just pulling some code from a repository on github. Then In vsCode I see the editor is suggesting to solve the merge conflict. Then I accept the incoming c

Use of function kmem_cache_shrink() in slab allocation

While going through the slab allocation mechanism, I came across the following function. int kmem_cache_shrink (struct kmem_cache *) The description of this fu

How can i implement a Web Server in Android Studio (Java) and react to requests?

Is it possible to create a local web server in Java (Android Studio IDE) and send broadcasts containing e.g the parameter f (http://localhost:8888/?f=SOMEDATA)

Whitelisting Azure DevOps Pipeline

I have a server in AWS, which is hosting a security tool. Azure DevOps supports this tool and I've installed the add on for it. I've added the step to my Pipeli

VB.Net Windows Form UserControl misplaced after location exceeds Form Height

I have a Windows Forms Application with an MDIParent Form and Windows Form. The Form has a handful of controls and on Form_Load I add a User Control. Private S

prompt toolkit accept when enter pressed

I am using prompt toolkit for my CLI. the issue I am facing is when having multiple options and if the user presses "enter" it executes the command. I want diff

Why can't I get a Python Script to connect to Telet Server but programs like PuTTY, SolorPuTTY and others connect just fine (WinError 10013)

I'm trying to write an application in Python for controlling a video switcher via Telnet. I can "remote" control the switcher by using simple Telnet commands I

Why does snprintf() take a size_t size limit, but returns an int number of chars printed?

The venerable snprintf() function... int snprintf( char *restrict buffer, size_t bufsz, const char *restrict format, ... ); returns the number of characters it

SignalR no longer works since upgrading to .NET Core 3.1

I have a websocket server application that I recently upgraded from .NET Core 2.1 to 3.1, however, since then the negotiation seems to fail. This is the error t

Docker build context puzzle

My project structure: projectRoot/ - service/ - data.json - Dockerfile In that Dockerfile : FROM node:16.14-alpine3.14 ENV THE_DATA=/tmp/data.js

How to show cursor during application debug c OpenGl on ubuntu in Visual Studio Code

window = glfwCreateWindow(winW, winH, "TestApp", NULL, NULL); After calling this command, the mouse cursor disappears. When a breakpoint is triggered after thi

How can I query in a bash script which of the haproxy load balancer hosts is currently the primary and which is the secondary?

I want to be able to determine which LB is primary and which is secondary from a bash script running on both load balancers. Background is: For the renewal of a

Boto3 not generating correct signed-url

I've a use case where I use lambda function to generate signed URL to upload to an S3 bucket, I also set the metadata values when generating signed URL, my boto

How to sign data with RSA private Key on Javascript/jquery

I got this C# code but I need it to be done in Javascript. The idea is that I need to execute this bit of code when there is no internet in the browser, basical

Remove nested relations from API explorer (swagger)

I have Application model with following relation: @belongsTo(() => Ido) idoId: string; export interface ApplicationRelations { ido?: IdoWithRelations

Getting org.hibernate.HibernateException - Unable to get the default Bean Validation factory

I have a maven project throwing Bean Validation factory error, added below dependencies still issue has not got resolved. Using java 11. <dependency>

Animations problems c# unity

I've been trying to create a game on unity and while I was trying to do the animations I'm realizing that I don't have any idea why my code is not working. //An